import { httpPost, type User } from "./base"

export interface LoginReq {
    account: string,
    pwd: string,
}

export interface LoginRes {
    user: User,
    token: string,
}

export const login = async (req: LoginReq) => {
    return await httpPost('/web_api/user/login', req) as LoginRes
}


